const query = require('./query/index');
const add = require('./add/index');
const del = require('./delete/index');
const change = require('./change/index');
const out = require('./out/index');
const over = require('./over/index');
const clear = require('./clear/index');

// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'query':
      return await query.query(event, context);
    case 'add':
      return await add.add(event, context);
    case 'delete':
      return await del.delete(event, context);
    case 'change':
      return await change.change(event, context);
    case 'out':
      return await out.out(event, context);
    case 'over':
      return await over.over(event, context);
    case 'clear':
      return await clear.clear(event, context);

  }
};